* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* 解决手机浏览器点击有选框的问题 */
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);

  font-family: "阿里巴巴普惠体";
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;

  min-height: 100vh;
  background-color: #333;
}

.box {
  width: 100%;
  height: 350px;

  position: relative;

  transform-style: preserve-3d;
}
.box div {
  width: 100%;
  height: 100%;

  position: absolute;

  transform-style: preserve-3d;

  animation: animate 24s linear infinite;
}
@keyframes animate {
  0% {
    transform: perspective(1000px) rotateX(0deg);
  }
  100% {
    transform: perspective(1000px) rotateX(360deg);
  }
}

.box div span {
  inset: 0;

  position: absolute;

  transform: rotateX(calc(var(--i) * 15deg));
}
.box div span::before {
  content: "3D旋转文字";

  width: 100%;
  height: 100%;
  text-align: center;
  color: #fffd;
  font-size: 8em;
  font-weight: 800;
  text-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  -webkit-text-stroke: 2px #000;

  position: absolute;
}
.box div span:nth-child(3n + 2):before {
  color: #e3f2fddd;
}
.box div span:nth-child(3n + 3):before {
  color: #fce4ecdd;
}
